#include <iostream>
#include <string>
using namespace std;

class Person {
public:
  Person(string name = "xxx", size_t age = 18, size_t money = 1000)
    :_name(name)
    ,_age(age)
    ,_money(money)
  {}
  ~Person(){}

  const Person& operator+=(const Person& p) {
    _money += p._money;
    return *this;
  } 

  size_t GetMoney() {
    return _money;
  }

private:
  string _name;
  size_t _age;
  size_t _money; // for example
};

int main()
{
  Person person1("tom", 18, 900); 
  Person person2("jerry", 19, 1900); 
  //person1.operator+=(person2);
  Person person3("ken", 20, 8000);
  cout << "money: " << person3.GetMoney() << endl;
  person3 += (person1 += person2); // person1.money + person2.money 
  cout << "money: " << person3.GetMoney() << endl;
  // sizeof .* :: . ?:
  return 0;
}
